package com.heima.pojo.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel("分页查询模型")
public class PageDto {
    @ApiModelProperty("查询分类的页码")
    private Integer pageIndex;
    @ApiModelProperty("查询分类的单页记录数")
    private Integer pageSize;

    public void check(){
        if(pageIndex <= 0){
            pageIndex = 1;
        }
        if(pageSize <= 0 ||pageSize > 100){
            pageSize = 10;
        }
    }
}
